package com.longrise.android.byjk.plugins.course.pay;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.webkit.WebView;

import com.longrise.android.byjk.R;
import com.longrise.android.byjk.utils.GetWebUrlHelper;
import com.longrise.common.base.web.BaseWebActivity;
import com.longrise.common.base.web.BaseWebBridge;
import com.longrise.common.base.web.BaseWebClient;

/**
 * Created by callxkj on 2017/12/16.
 * 支付协议详情页
 */

public class BuyProtocolActivity extends BaseWebActivity {


    private WebView mWv;

    @Override
    public int getContentViewId(@Nullable Bundle savedInstanceState) {
         return R.layout.app_web_comment; //简单的公共布局
    }

    @Override
    public WebView getWebView() {
      return mWv;
    }

    @Override
    public void init() {
        mWv = (WebView) findViewById(R.id.comment_wv);
    }

    @Override
    public void initData() {
        GetWebUrlHelper.getWebUrl(GetWebUrlHelper.GMXY, new GetWebUrlHelper.OnGetWebUrlResultListener() {
            @Override
            public void onSuccess(String url) {
                loadUrl(url);
            }

            @Override
            public void onError(String errormsg) {
                showToast(errormsg);
            }
        });
    }

    @Override
    public BaseWebBridge getwebBridge() {
        return null;
    }

    @Override
    public BaseWebClient getWebClient() {
        return new BuyProtocolClient(this);
    }
}
